<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    <script type="text/javascript">
        //需要判断浏览器支不支持，可以去w3c进行查看
        var source = new EventSource('sse/sseTest');
        source.onmessage = function (event) {
            console.info(event.data);
            document.getElementById('result').innerText = event.data
        };
    </script>
</head>
<body>
消息
<div id="result"></div>
</body>


</html>
